# todo: 单词都是重复的，字符串去重
# 输入: "Wingardium Leviosa Wingardium Leviosa Expelliarmus Leviosa Expelliarmus"
# 输出: "Wingardium Leviosa Expelliarmus"
# a = "Wingardium Leviosa Wingardium Leviosa Expelliarmus Leviosa Expelliarmus"
# a_1 = ""
# for i in a:
#     if i not in a_1:
#         a_1 += i
# print(a_1)
def a(text):
    words = text.split()
    b = []
    seen = set()
    for i in words:
        if i not in seen:
            b.append(i)
            seen.add(i)
    result = " ".join(b)
    return result

text = "Wingardium Leviosa Wingardium Leviosa Expelliarmus Leviosa Expelliarmus"
print(a(text))




